var status = -1;
var selectionLog = [];

function start(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status == a++) {
            cm.sendNormalTalk("……所有的东西居然都是幻影。虽然这样也好，但是她究竟要做什么呢。", 17, 0, false, true)
        } else {
            if (status === a++) {
                cm.sendNormalTalk("还没找到祠堂。浓姬肯定在那里。", 17, 0, true, true)
            } else {
                if (status === a++) {
                    cm.sendNormalTalk("祠堂在西边。", 17, 0, true, true)
                } else {
                    if (status === a++) {
                        cm.forceStartQuest(58927, "");
                        cm.dispose()
                    }
                }
            }
        }
    }
}

function stage0(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status == a++) {
            var e = cm.getQuest();
            cm.askYesNo("这个任务的依次对话脚本还没有修复哦。它的脚本位于： #b 脚本/任务/58927.js#k\r\n\r\n如果你有兴趣，欢迎一起来修复！\r\n\r\n那么现在，你要立刻开始这个任务吗？")
        } else {
            if (status == a++) {
                cm.forceStartQuest();
                cm.dispose()
            }
        }
    }
}

function end(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status == a++) {
            cm.sendNormalTalk(" 她已经……变成了非常强大的妖怪。", 17, 0, false, true)
        } else {
            if (status === a++) {
                cm.sendNormalTalk("……先把这个镜子交给菖蒲吧。", 17, 0, true, true)
            } else {
                if (status === a++) {
                    cm.forceCompleteQuest(58927);
                    cm.forceStartQuest(58979, "end");
                    cm.forceStartQuest(58978, "3");
                    cm.onActionBarResult(6, -1);
                    cm.mapleHeroBecomeNpc(-1, 1);
                    cm.dispose();
                    cm.warp(811000008, 0, false)
                }
            }
        }
    }
};